package com.platform.system.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.platform.common.bean.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Id;

/**
 * describe:系统配置表
 *
 * @author rainly
 * @date 2019/12/06
 * @time 2:47 下午
 */
@ApiModel(value = "系统配置表", description = "系统配置表 SysConfig")
@Data
@TableName(value = "sys_config")
public class SysConfig extends BaseEntity<SysConfig> {

    @ApiModelProperty(value = "系统配置id", name = "id", example = "32位uuid", required = true)
    @Id
    @Column(name = "id", length = 32, columnDefinition = "varchar(32) COMMENT '主键'")
    @TableId(type = IdType.ASSIGN_ID)
    private String id;

    @ApiModelProperty(value = "编码", name = "code", example = "编码", required = true)
    @Column(name = "code", length = 10, columnDefinition = "varchar(10) COMMENT '编码'")
    private String code;

    @ApiModelProperty(value = "角色继承", name = "role_inheritance", example = "角色继承", required = true)
    @Column(name = "role_inheritance", length = 10, columnDefinition = "varchar(10) COMMENT '角色继承 protect 受限继承 publicly 一般继承'")
    private String roleInheritance;

    @ApiModelProperty(value = "职责分离", name = "separation_of_duty", example = "职责分离", required = true)
    @Column(name = "separation_of_duty", length = 10, columnDefinition = "varchar(10) COMMENT '职责分离 statically 静态 dynamic 动态'")
    private String separationOfDuty;

    @ApiModelProperty(value = "权限粒度", name = "permission_grain", example = "权限粒度", required = true)
    @Column(name = "permission_grain", length = 10, columnDefinition = "varchar(100) COMMENT '权限粒度 功能菜单权限 menu 功能操作权限 operation 数据字段权限 data'")
    private String permissionGrain;

    @ApiModelProperty(value = "标记", name = "flag", example = "标记(diabale 删除 unable 正常)", required = true)
    @Column(name = "flag", length = 20, columnDefinition = "varchar(20) COMMENT '标记(diabale 删除 unable 正常)'")
    @TableField(fill = FieldFill.INSERT)
    private String flag;
}
